/**
 * Description:
 * Class Name:people
 * Date:2022/1/25 17:41
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第5章_面向对象_上.课后练习.第三题的总包.人;

public class people {
    // 每个人都有自己的名字、年龄和职业
    protected String name;
    protected int age;
    protected String vocation;

    protected people(String name, int age, String vocation){
        this.name = name;
        this.age = age;
        this.vocation = vocation;
    }

    // 都应该有获取相应属性的办法
    public String getName(){
        return this.name;
    }
    public int getAge(){
        return this.age;
    }
    public String getVocation(){
        return this.vocation;
    }

    public void setName(String new_name){
        this.name = new_name;
    }
    public void setAge(int new_age){
        this.age = new_age;
    }
    public void setVocation(String new_vocation){
        this.vocation = new_vocation;
    }
}
